Repository navigation
Extend release-time Compose-template validation to llama.cpp and SearXNG - #21
Merged
Merged
Conversation
validate_appliance_configuration only rendered and validated Pi-hole's Compose template against `docker compose config` before activation; a malformed llama/compose.yaml.in or searxng/compose.yaml.in would pass release validation silently and only fail later, at real Compose-up time on a device. Generalizes the same loop shape IMAGE_COMPONENTS already established (COMPOSE_TEMPLATES), handling llama's second deploy-time placeholder and SearXNG's SEARXNG_SECRET env-var reference. Verified against real docker (not the fake stub used elsewhere in this suite) that all three real templates pass and a structurally broken one is rejected. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
kasunben
marked this pull request as ready for review
August 22, 2026 08:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
validate_appliance_configurationpreviously rendered and randocker compose config --quietagainst Pi-hole's Compose template only — a malformedllama/compose.yaml.inorsearxng/compose.yaml.inwould passvalidate_release_payloadsilently and only fail later, at real Compose-up time on a deviceCOMPOSE_TEMPLATES, the same data-driven loop shapeIMAGE_COMPONENTSalready established for image-import validationrender_compose_template(), independently unit-testable without needing a full appliance fixture@LLAMA_MODEL_FILENAME@, substituted bystart-llama-serverat deploy time, not release-validation time) and SearXNG'sSEARXNG_SECRETenv-var reference (mirroringstart-searxng's own real invocation shape)Test plan
tests/test_appliance_compose_validation.py(12 tests): pure-logic rendering/rejection tests, plusdocker-gated tests (realdocker, not the fake stub used elsewhere in this suite) confirming all three real templates pass and a structurally broken template is rejectedpython3 -m unittest discover -s tests -v— 634/634 pass (622 previous + 12 new)docker compose configon this machine before writing tests🤖 Generated with Claude Code